package com.mebs.model.service.procurement;

import org.jt.jet.content.JetNamedObject;

/**
 * @author Alexander V. Ivanov
 */
public enum ProcurementReportType implements JetNamedObject {
    OPEN_QUOTES(1, "open_quotes", "Procurement Report #1:  Open Quotes"),
    CLOSED_QUOTES(2, "closed_quotes", "Procurement Report #2:   Closed Quotes"),
    CLIENT_REPORT(3, "client_report", "Procurement Report #3:  Client Report"),
    MEBS_REPORT(4, "mebs_report", "Procurement Report #4:  MEBS Report");

    public final int type;
    public final String name;
    public final String title;

    ProcurementReportType(int type, String name, String title)
    {
        this.type = type;
        this.name = name;
        this.title = title;
    }

    public static ProcurementReportType getObjectByType(int type)
    {
        return ProcurementReportType.values()[type - 1];
    }

    public Object getObjectId()
    {
        return type;
    }

    public String getObjectName()
    {
        return name;
    }

    public int getType()
    {
        return type;
    }

    public String getName()
    {
        return name;
    }

    public String getTitle()
    {
        return title;
    }

    public String toString()
    {
        return name;
    }
}
